// Fill out your copyright notice in the Description page of Project Settings.


#include "StateMachine/PlayerState/IdleState.h"

#include "Core/Character2D.h"
#include "StateMachine/StateMachine.h"
#include "StateMachine/PlayerState/DashState.h"
#include "StateMachine/PlayerState/MoveState.h"

void UIdleState::Enter()
{
	Super::Enter();
	UE_LOG(LogTemp, Warning, TEXT("UIdleState::Enter"));
	Character->PlayAnimation(FName("Idle"));
}

void UIdleState::Tick(float Delta)
{
	Super::Tick(Delta);
	// UE_LOG(LogTemp, Warning, TEXT("UIdleState::Tick"));
}

void UIdleState::Exit()
{
	Super::Exit();
	UE_LOG(LogTemp, Warning, TEXT("UIdleState::Exit"));
}

void UIdleState::InputSignal(EInputSignal Signal, const FInputActionValue& Value)
{
	Super::InputSignal(Signal, Value);


	if (Signal == EInputSignal::Moving)
	{
		StateMachine->SwitchState(UMoveState::StaticClass());
		return;
	}
	
}
